/*
 *     This file is part of Neptune Network Emulator.
 *
 *  Neptune Network Emulator is free software: 
 *  you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Neptune Network Emulator is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Neptune Network Emulator.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
/**
 *
 */
package neptune.web.client.services.experiment;


import neptune.web.client.model.topology.SerializableTopology;
import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * @author Luigi Lorenzo Arpino [luigiarpino@yahoo.it]
 *
 */
public interface TemplateServiceAsync
{

	/**
	 * Restituisce l'elenco dei template disponibili
	 * 
	 * [0] contiene il nome del file del template
	 * [1] contiene l'ID del template
	 * [2] contiene la descrizione del template
	 * 
	 * @return
	 * @throws SecurityException
	 * @throws Exception
	 */
	public void getAllTemplate(AsyncCallback<String[][]> callback);

	/**
	 * Restituisce l'XML che descrive il template
	 * 
	 * @param fileName
	 * @return
	 * @throws SecurityException
	 */
	public void getXMLTemplate(String fileName, AsyncCallback<String> callback);
	
	/**
	 * Ottiene la topologia descritta da un dato template
	 * 
	 * @param fileName
	 * @return
	 * @throws SecurityException
	 */
	public void getTopology(String fileName, AsyncCallback<SerializableTopology> callback);
	
	/**
	 * Salva un template
	 * 
	 * @param serTopology
	 * @return
	 * @throws SecurityException
	 */
	public void saveTemplate(SerializableTopology serTopology, AsyncCallback<Boolean> callback);
	
	/**
	 * Elimina un template
	 * 
	 * @param fileName il nome del file da eliminare
	 * @return
	 * @throws SecurityException
	 */
	public void deleteTemplate(String fileName, AsyncCallback<Boolean> callback);
	
	

}
